<template>
  <div>
    <h3>childOne</h3>
    <son-one></son-one>
  </div>
</template>

<script>
import SonOne from "./SonOne.vue";
export default {
  mounted() {
    //   $children获取的是当前组件的所有子组件的  数组
    console.log(this.$children);
    console.log(this.$children[0].msg);
    console.log(this.$parent); //app
    console.log(this.$parent.info);
  },
  data() {
    return {
      info: "一听课我感觉我啥也知道，一让我写，我感觉我啥也不知道",
    };
  },
  components: { SonOne },
};
</script>

<style lang="scss" scoped>
</style>